package create_创建型.abstract_factory_pattern_抽象工厂模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/03/14:55
 * @Description:
 */
public class FactoryProducer {

	public static AbstractFactory getFactory(String choise) {
		if (choise != null) {
			if (choise.equalsIgnoreCase("color")) {
				return new ColorFactory();
			}
			if (choise.equalsIgnoreCase("shape")) {
				return new ShapeFactory();
			}
		}
		return null;
	}
}
